]> dgit.raspbian.org Git - gst-plugins-bad1.0.git/commitdiff
[PATCH] h264parse: Check for enough slice header data being available
authorSebastian Dröge <sebastian@centricular.com>
Tue, 16 Jun 2026 12:23:13 +0000 (15:23 +0300)
committerMoritz Mühlenhoff <jmm@debian.org>
Fri, 14 Aug 2026 15:49:42 +0000 (17:49 +0200)
Gbp-Pq: Name CVE-2026-12892.patch

gst/videoparsers/gsth264parse.c

index cfdd64df09a17a95fcfc1a6c528744a2e0e1d82e..d17cb0fa5ce637f74475aed362e5d2dd20bc0bed 100644 (file)
@@ -1105,7 +1105,8 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu)
       h264parse->picture_start = TRUE;
 
       /* don't need to parse the whole slice (header) here */
-      if (*(nalu->data + nalu->offset + nalu->header_bytes) & 0x80) {
+      if (nalu->size > nalu->header_bytes &&
+          *(nalu->data + nalu->offset + nalu->header_bytes) & 0x80) {
         /* means first_mb_in_slice == 0 */
         /* real frame data */
         GST_DEBUG_OBJECT (h264parse, "first_mb_in_slice = 0");